<?php
/**
 * Created by PhpStorm.
 * User: Shen
 * Date: 2016/7/24
 * Time: 18:05
 */
namespace DuiCode;

class ColorDrawDecorator implements DrawDecorator{
    protected $color;

    function __construct($color = 'red'){
        $this->color = $color;
    }

    function beforeDraw(){
        // TODO: Implement beforeDraw() method.
        echo "<div style='color: {$this->color}'>";
    }

    function afterDraw(){
        // TODO: Implement afterDraw() method.
        echo "</div>";
    }
}
